﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Articles : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        List<Util.Article> artList = new List<Util.Article>();

        if (new BLL.Articles().GetArticlesList(out artList))
        {
            listNews.DataSource = artList;
            listNews.DataBind();
        }
        else
        {
            //написать, что ошика!
        }
        if (MessGbookDataPager.TotalRowCount <= MessGbookDataPager.MaximumRows)
            MessGbookDataPager.Visible = false;

        if (MessGbookDataPager.TotalRowCount == 0)
            aboutNullMess.Text = "список новостей пуст!";
    }
}